package com.lw.common.enums;

import com.mybatisflex.annotation.EnumValue;
import lombok.Getter;

/**
 * 菜单类型枚举
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0
 */
@Getter
public enum GlobalTypeEnum {

    // 菜单路由类型
    ROUTE_NULL(0, null),
    ROUTE_MENU(1, "菜单"),
    ROUTE_CATALOG(2, "目录"),
    ROUTE_EXT_LINK(3, "外链"),
    ROUTE_BUTTON(4, "按钮"),


    // 菜单,用户等状态（0正常 1停用）
    STATE_ENABLE(1, "启用"),
    STATE_DISABLE(0, "禁用"),

    //通用是否已删
    STATE_DELETE(1, "已删"),
    STATE_NO_DELETE(0, "未删"),

    //通知枚举
    NOTICE_ALL(1, "全体"),
    NOTICE_SPECIFIED(2, "指定"),
    //通知读取状态（0: 未读, 1: 已读）
    NOTICE_NO_READ(0, "未读"),
    NOTICE_READ(1, "已读"),
    //通告发布状态枚举
    NOTICE_UNPUBLISHED(0, "未发布"),
    NOTICE_PUBLISHED(1, "已发布"),
    NOTICE_REVOKED(-1, "已撤回");


    //  Mybatis-Plus 提供注解表示插入数据库时插入该值
    @EnumValue
    private final Integer value;

    // @JsonValue //  表示对枚举序列化时返回此字段
    private final String label;

    GlobalTypeEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }
}
